/* libfake437 - a library for the rendering of code page 437 `graphics'
 * Copyright (C) 2008, 2009 Jack Kelly <endgame.dos@gmail.com>
 *
 * This library is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 ** @node Primitive Operations
 ** @chapter Primitive Operations
 **/

#ifndef FAKE437_PRIMITIVE_H
#define FAKE437_PRIMITIVE_H

#ifdef __cplusplus
extern "C"{
#endif

/**
 ** @deftypefun void f437_put_char  @
 **   (SDL_Surface*  @var{surface}, @
 **    Sint32        @var{x},       @
 **    Sint32        @var{y},       @
 **    unsigned char @var{ch},      @
 **    F437Color     @var{fg},      @
 **    F437Color     @var{bg})
 **
 ** @code{f437_put_char} draws the character whose code is @var{ch} on
 ** @var{surface}. @var{x} and @var{y} define an offset in
 ** pixels. @var{fg} and @var{bg} are the foreground and background
 ** colors, drawn from the @code{F437Color} enum (@pxref{Data Types}).
 **
 ** @end deftypefun
 **/
void f437_put_char(SDL_Surface* surface,
                   Sint32 x, Sint32 y,
                   unsigned char ch, F437Color fg, F437Color bg);

/**
 ** @deftypefun void f437_put_rect  @
 **   (SDL_Surface*  @var{surface}, @
 **    Sint32        @var{x},       @
 **    Sint32        @var{y},       @
 **    Uint32        @var{width},   @
 **    Uint32        @var{height},  @
 **    unsigned char @var{ch},      @
 **    F437Color     @var{fg},      @
 **    F437Color     @var{bg})
 **
 ** @code{f437_put_rect} draws a rectangle using the character with
 ** code @var{ch} on @var{surface}. @var{x} and @var{y} are pixel
 ** offsets. @var{width} and @var{height} define the width and height
 ** of the rectangle in characters. @var{fg} and @var{bg} are the
 ** foreground and background colors (@pxref{Data Types}).
 **
 ** @end deftypefun
 **/
void f437_put_rect(SDL_Surface* surface,
                   Sint32 x, Sint32 y, Uint32 width, Uint32 height,
                   unsigned char ch, F437Color fg, F437Color bg);

/**
 ** @deftypefun void f437_put_string @
 **   (SDL_Surface* @var{surface},   @
 **    Sint32       @var{x},         @
 **    Sint32       @var{y},         @
 **    const char*  @var{string},    @
 **    F437Color    @var{fg},        @
 **    F437Color    @var{bg})
 **
 ** @code{f437_put_string} writes a null-terminated string pointed to
 ** by @var{string} to @var{surface}. As with @code{f437_put_char},
 ** @var{x} and @var{y} are offsets in pixels and @var{fg} and
 ** @var{bg} are the foreground and background colors to use
 ** (@pxref{Data Types}).
 **
 ** @end deftypefun
 **/
void f437_put_string(SDL_Surface* surface,
                     Sint32 x, Sint32 y,
                     const char* string, F437Color fg, F437Color bg);

#ifdef __cplusplus
}
#endif

#endif
